package com.itheima.work01;

import java.util.concurrent.ExecutorCompletionService;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class Work01 {
    public static void main(String[] args) throws InterruptedException {
        ExecutorService executorService = Executors.newCachedThreadPool();
        executorService.submit(()->{
            for (int i = 0; i < 20; i++) {
                System.out.println(Thread.currentThread().getName()+"执行了");
            }
        });
        Thread.sleep(100);;
    }
}
